<template>
  <main class="tutorial-home">
    <div class="welcome-container animated zoomIn">
      <div class="logo-container">
        <div class="vue-logo">
          <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 261.76 226.69">
            <path fill="#41b883" d="M161.096.001l-30.224 52.35L100.647.002H-.005L130.872 226.69 261.749.002z"/>
            <path fill="#35495e" d="M161.096.001l-30.224 52.35L100.647.002H52.514L130.872 135.663l78.38-135.66z"/>
          </svg>
        </div>
      </div>
      <h1 class="main-title">Vue 3 学习教程</h1>
      <p class="subtitle">欢迎来到Vue 3学习网站，从基础到进阶，全面掌握Vue开发技能</p>
      <RouterLink to="/tutorial" class="start-button animated pulse infinite">开始学习</RouterLink>
    </div>
  </main>
</template>

<script setup>
import { onMounted } from 'vue'

// 添加页面加载动画
onMounted(() => {
  document.querySelector('.tutorial-home').classList.add('animated', 'fadeIn')
})
</script>

<style scoped>
.tutorial-home {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 1rem;
}

.welcome-container {
  text-align: center;
  max-width: 800px;
  padding: 3rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.welcome-container:before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(66, 184, 131, 0.1) 0%, transparent 70%);
  animation: rotate 10s linear infinite;
  z-index: -1;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.logo-container {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.vue-logo {
  width: 120px;
  height: 120px;
  animation: float 3s ease-in-out infinite;
}

.vue-logo svg {
  width: 100%;
  height: 100%;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
  100% {
    transform: translateY(0px);
  }
}

.main-title {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  color: #2c3e50;
  font-weight: 700;
  background: linear-gradient(45deg, #42b883, #35495e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
  font-size: 1.4rem;
  color: #666;
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

.start-button {
  display: inline-block;
  padding: 15px 40px;
  background: linear-gradient(45deg, #42b883, #359c6d);
  color: white;
  font-size: 1.2rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 50px;
  transition: all 0.3s ease;
  box-shadow: 0 10px 20px rgba(66, 184, 131, 0.3);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.start-button:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(66, 184, 131, 0.4);
  background: linear-gradient(45deg, #359c6d, #42b883);
}

@media (max-width: 768px) {
  .welcome-container {
    padding: 2rem;
  }
  
  .main-title {
    font-size: 2.2rem;
  }
  
  .subtitle {
    font-size: 1.1rem;
  }
  
  .vue-logo {
    width: 80px;
    height: 80px;
  }
}
</style>
